package org.krams.service;

import java.util.Collection;

import org.krams.domain.User;
import org.springframework.security.core.GrantedAuthority;

public class CustomUserDetails extends org.springframework.security.core.userdetails.User {//implements UserDetails {
	private static final long serialVersionUID = 1310744550362738456L;

	private Long id;

	public CustomUserDetails(User user, Collection<? extends GrantedAuthority> authorities) {
		super(user.getUsername(), user.getPassword(), user.getEnabled(), true, true, user
				.getEnabled(), authorities);
		id = user.getId();
	}

	public Long getId() {
		return id;
	}

}
